package com.vict.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vict.entity.AppVersion;
import com.vict.enums.app.Platform;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AppVersionMapper extends BaseMapper<AppVersion> {
    List<AppVersion> selectMyList(@Param("platform") Platform platform);

    AppVersion selectVersion(@Param("platform")Platform platform);

    AppVersion selectOneMethod(@Param("platform")Platform platform,
                               @Param("updateMethod") AppVersion.UpdateMethod updateMethod,
                               @Param("nowVersion")Integer nowVersion,
                               @Param("updateVersion")Integer updateVersion);

    AppVersion selectOneForce(@Param("platform")Platform platform,
                              @Param("nowVersion")Integer nowVersion,
                              @Param("updateVersion")Integer updateVersion);
}
